<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/echarts.min.js"></script>
    <script src="../js/jquery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            overflow: hidden;
            -webkit-user-select: none; /* Safari */
            -moz-user-select: none; /* Firefox */
            -ms-user-select: none; /* IE10+/Edge */
            user-select: none; /* Standard syntax */
        }

        body {
            /*background-color: transparent;*/
            /*background-color: #0092AB;*/
            background-color: #fff;
            /*border-radius: 10px;*/
        }
    </style>
</head>
<body>
<div id="test1"></div>
<div id="test2"></div>
<div id="main" style="width: 100%;height:100vh;"></div>
<script type="text/javascript">

    let myData = [
        {
            "idx": 0,
            "x1": 6,
            "y1": 9,
            "x2": 4,
            "y2": 7,
            "red": true,
            "fen1": "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR",
            "fen2": "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C2B2C1/9/RNBAKA1NR",
            "name": "相三进五",
            "score": 1,
            "scoreUp": 0
        },
        {
            "idx": 1,
            "x1": 1,
            "y1": 0,
            "x2": 2,
            "y2": 2,
            "red": false,
            "fen1": "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C2B2C1/9/RNBAKA1NR",
            "fen2": "r1bakabnr/9/1cn4c1/p1p1p1p1p/9/9/P1P1P1P1P/1C2B2C1/9/RNBAKA1NR",
            "name": "马２进３",
            "score": 17,
            "scoreUp": 0
        },
        {
            "idx": 2,
            "x1": 1,
            "y1": 9,
            "x2": 0,
            "y2": 7,
            "red": true,
            "fen1": "r1bakabnr/9/1cn4c1/p1p1p1p1p/9/9/P1P1P1P1P/1C2B2C1/9/RNBAKA1NR",
            "fen2": "r1bakabnr/9/1cn4c1/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/9/R1BAKA1NR",
            "name": "马八进九",
            "score": 1,
            "scoreUp": 0
        },
        {
            "idx": 3,
            "x1": 7,
            "y1": 2,
            "x2": 4,
            "y2": 2,
            "red": false,
            "fen1": "r1bakabnr/9/1cn4c1/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/9/R1BAKA1NR",
            "fen2": "r1bakabnr/9/1cn1c4/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/9/R1BAKA1NR",
            "name": "砲８平５",
            "score": 28,
            "scoreUp": 0
        },
        {
            "idx": 4,
            "x1": 7,
            "y1": 9,
            "x2": 5,
            "y2": 8,
            "red": true,
            "fen1": "r1bakabnr/9/1cn1c4/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/9/R1BAKA1NR",
            "fen2": "r1bakabnr/9/1cn1c4/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/5N3/R1BAKA2R",
            "name": "马二进四",
            "score": 0,
            "scoreUp": 0
        },
        {
            "idx": 5,
            "x1": 7,
            "y1": 0,
            "x2": 6,
            "y2": 2,
            "red": false,
            "fen1": "r1bakabnr/9/1cn1c4/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/5N3/R1BAKA2R",
            "fen2": "r1bakab1r/9/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/5N3/R1BAKA2R",
            "name": "马８进７",
            "score": 9,
            "scoreUp": 0
        },
        {
            "idx": 6,
            "x1": 0,
            "y1": 9,
            "x2": 0,
            "y2": 8,
            "red": true,
            "fen1": "r1bakab1r/9/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/5N3/R1BAKA2R",
            "fen2": "r1bakab1r/9/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/R4N3/2BAKA2R",
            "name": "车九进一",
            "score": -36,
            "scoreUp": 0
        },
        {
            "idx": 7,
            "x1": 0,
            "y1": 0,
            "x2": 0,
            "y2": 1,
            "red": false,
            "fen1": "r1bakab1r/9/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/R4N3/2BAKA2R",
            "fen2": "2bakab1r/r8/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/R4N3/2BAKA2R",
            "name": "车１进１",
            "score": -32,
            "scoreUp": 0
        },
        {
            "idx": 8,
            "x1": 0,
            "y1": 8,
            "x2": 3,
            "y2": 8,
            "red": true,
            "fen1": "2bakab1r/r8/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/R4N3/2BAKA2R",
            "fen2": "2bakab1r/r8/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N3/2BAKA2R",
            "name": "车九平六",
            "score": -65,
            "scoreUp": 0
        },
        {
            "idx": 9,
            "x1": 0,
            "y1": 1,
            "x2": 5,
            "y2": 1,
            "red": false,
            "fen1": "2bakab1r/r8/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N3/2BAKA2R",
            "fen2": "2bakab1r/5r3/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N3/2BAKA2R",
            "name": "车１平６",
            "score": -105,
            "scoreUp": 0
        },
        {
            "idx": 10,
            "x1": 8,
            "y1": 9,
            "x2": 8,
            "y2": 8,
            "red": true,
            "fen1": "2bakab1r/5r3/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N3/2BAKA2R",
            "fen2": "2bakab1r/5r3/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "name": "车一进一",
            "score": -101,
            "scoreUp": 0
        },
        {
            "idx": 11,
            "x1": 5,
            "y1": 1,
            "x2": 5,
            "y2": 4,
            "red": false,
            "fen1": "2bakab1r/5r3/1cn1c1n2/p1p1p1p1p/9/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "fen2": "2bakab1r/9/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "name": "车６进３",
            "score": -6,
            "scoreUp": 0
        },
        {
            "idx": 12,
            "x1": 7,
            "y1": 7,
            "x2": 7,
            "y2": 9,
            "red": true,
            "fen1": "2bakab1r/9/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "fen2": "2bakab1r/9/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B4/3R1N2R/2BAKA1C1",
            "name": "炮二退二",
            "score": -259,
            "scoreUp": 0
        },
        {
            "idx": 13,
            "x1": 8,
            "y1": 0,
            "x2": 8,
            "y2": 1,
            "red": false,
            "fen1": "2bakab1r/9/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B4/3R1N2R/2BAKA1C1",
            "fen2": "2bakab2/8r/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B4/3R1N2R/2BAKA1C1",
            "name": "车９进１",
            "score": -222,
            "scoreUp": 0
        },
        {
            "idx": 14,
            "x1": 7,
            "y1": 9,
            "x2": 7,
            "y2": 7,
            "red": true,
            "fen1": "2bakab2/8r/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B4/3R1N2R/2BAKA1C1",
            "fen2": "2bakab2/8r/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "name": "炮二进二",
            "score": -262,
            "scoreUp": 0
        },
        {
            "idx": 15,
            "x1": 2,
            "y1": 3,
            "x2": 2,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/8r/1cn1c1n2/p1p1p1p1p/5r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "fen2": "2bakab2/8r/1cn1c1n2/p3p1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "name": "卒３进１",
            "score": -222,
            "scoreUp": 0
        },
        {
            "idx": 16,
            "x1": 3,
            "y1": 8,
            "x2": 3,
            "y2": 3,
            "red": true,
            "fen1": "2bakab2/8r/1cn1c1n2/p3p1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/3R1N2R/2BAKA3",
            "fen2": "2bakab2/8r/1cn1c1n2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/5N2R/2BAKA3",
            "name": "车六进五",
            "score": -411,
            "scoreUp": 0
        },
        {
            "idx": 17,
            "x1": 4,
            "y1": 2,
            "x2": 5,
            "y2": 2,
            "red": false,
            "fen1": "2bakab2/8r/1cn1c1n2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/5N2R/2BAKA3",
            "fen2": "2bakab2/8r/1cn2cn2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/5N2R/2BAKA3",
            "name": "砲５平６",
            "score": -186,
            "scoreUp": 0
        },
        {
            "idx": 18,
            "x1": 5,
            "y1": 9,
            "x2": 4,
            "y2": 8,
            "red": true,
            "fen1": "2bakab2/8r/1cn2cn2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/5N2R/2BAKA3",
            "fen2": "2bakab2/8r/1cn2cn2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "name": "仕四进五",
            "score": -397,
            "scoreUp": 0
        },
        {
            "idx": 19,
            "x1": 5,
            "y1": 2,
            "x2": 5,
            "y2": 3,
            "red": false,
            "fen1": "2bakab2/8r/1cn2cn2/p2Rp1p1p/2p2r3/9/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "fen2": "2bakab2/8r/1cn3n2/p2Rpcp1p/2p2r3/9/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "name": "砲６进１",
            "score": -210,
            "scoreUp": 0
        },
        {
            "idx": 20,
            "x1": 3,
            "y1": 3,
            "x2": 3,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/8r/1cn3n2/p2Rpcp1p/2p2r3/9/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "fen2": "2bakab2/8r/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "name": "车六退二",
            "score": -388,
            "scoreUp": 0
        },
        {
            "idx": 21,
            "x1": 8,
            "y1": 1,
            "x2": 7,
            "y2": 1,
            "red": false,
            "fen1": "2bakab2/8r/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "fen2": "2bakab2/7r1/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "name": "车９平８",
            "score": -425,
            "scoreUp": 0
        },
        {
            "idx": 22,
            "x1": 7,
            "y1": 7,
            "x2": 5,
            "y2": 7,
            "red": true,
            "fen1": "2bakab2/7r1/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2B2C1/4AN2R/2BAK4",
            "fen2": "2bakab2/7r1/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2BC3/4AN2R/2BAK4",
            "name": "炮二平四",
            "score": -543,
            "scoreUp": 0
        },
        {
            "idx": 23,
            "x1": 5,
            "y1": 3,
            "x2": 5,
            "y2": 7,
            "red": false,
            "fen1": "2bakab2/7r1/1cn3n2/p3pcp1p/2p2r3/3R5/P1P1P1P1P/NC2BC3/4AN2R/2BAK4",
            "fen2": "2bakab2/7r1/1cn3n2/p3p1p1p/2p2r3/3R5/P1P1P1P1P/NC2Bc3/4AN2R/2BAK4",
            "name": "砲６进４",
            "score": -451,
            "scoreUp": 0
        },
        {
            "idx": 24,
            "x1": 4,
            "y1": 8,
            "x2": 5,
            "y2": 7,
            "red": true,
            "fen1": "2bakab2/7r1/1cn3n2/p3p1p1p/2p2r3/3R5/P1P1P1P1P/NC2Bc3/4AN2R/2BAK4",
            "fen2": "2bakab2/7r1/1cn3n2/p3p1p1p/2p2r3/3R5/P1P1P1P1P/NC2BA3/5N2R/2BAK4",
            "name": "仕五进四",
            "score": -397,
            "scoreUp": 0
        },
        {
            "idx": 25,
            "x1": 2,
            "y1": 2,
            "x2": 3,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/7r1/1cn3n2/p3p1p1p/2p2r3/3R5/P1P1P1P1P/NC2BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/2pn1r3/3R5/P1P1P1P1P/NC2BA3/5N2R/2BAK4",
            "name": "马３进４",
            "score": -379,
            "scoreUp": 0
        },
        {
            "idx": 26,
            "x1": 1,
            "y1": 7,
            "x2": 1,
            "y2": 4,
            "red": true,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/2pn1r3/3R5/P1P1P1P1P/NC2BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1Cpn1r3/3R5/P1P1P1P1P/N3BA3/5N2R/2BAK4",
            "name": "炮八进三",
            "score": -376,
            "scoreUp": 0
        },
        {
            "idx": 27,
            "x1": 2,
            "y1": 4,
            "x2": 2,
            "y2": 5,
            "red": false,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1Cpn1r3/3R5/P1P1P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1C1n1r3/2pR5/P1P1P1P1P/N3BA3/5N2R/2BAK4",
            "name": "卒３进１",
            "score": -348,
            "scoreUp": 0
        },
        {
            "idx": 28,
            "x1": 2,
            "y1": 6,
            "x2": 2,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1C1n1r3/2pR5/P1P1P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1C1n1r3/2PR5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "兵七进一",
            "score": -400,
            "scoreUp": 0
        },
        {
            "idx": 29,
            "x1": 3,
            "y1": 4,
            "x2": 1,
            "y2": 5,
            "red": false,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1C1n1r3/2PR5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1C3r3/1nPR5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "马４进２",
            "score": -384,
            "scoreUp": 0
        },
        {
            "idx": 30,
            "x1": 2,
            "y1": 5,
            "x2": 2,
            "y2": 4,
            "red": true,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1C3r3/1nPR5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1CP2r3/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "兵七进一",
            "score": -590,
            "scoreUp": 0
        },
        {
            "idx": 31,
            "x1": 5,
            "y1": 4,
            "x2": 2,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1CP2r3/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p3p1p1p/1Cr6/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车６平３",
            "score": -546,
            "scoreUp": 0
        },
        {
            "idx": 32,
            "x1": 1,
            "y1": 4,
            "x2": 1,
            "y2": 3,
            "red": true,
            "fen1": "2bakab2/7r1/1c4n2/p3p1p1p/1Cr6/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/pC2p1p1p/2r6/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "炮八进一",
            "score": -755,
            "scoreUp": 0
        },
        {
            "idx": 33,
            "x1": 2,
            "y1": 4,
            "x2": 2,
            "y2": 3,
            "red": false,
            "fen1": "2bakab2/7r1/1c4n2/pC2p1p1p/2r6/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/pCr1p1p1p/9/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车３退１",
            "score": -612,
            "scoreUp": 0
        },
        {
            "idx": 34,
            "x1": 1,
            "y1": 3,
            "x2": 1,
            "y2": 4,
            "red": true,
            "fen1": "2bakab2/7r1/1c4n2/pCr1p1p1p/9/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/7r1/1c4n2/p1r1p1p1p/1C7/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "炮八退一",
            "score": -752,
            "scoreUp": 0
        },
        {
            "idx": 35,
            "x1": 7,
            "y1": 1,
            "x2": 7,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/7r1/1c4n2/p1r1p1p1p/1C7/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/1c4n2/p1r1p1p1p/1C5r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车８进３",
            "score": -745,
            "scoreUp": 0
        },
        {
            "idx": 36,
            "x1": 1,
            "y1": 4,
            "x2": 4,
            "y2": 4,
            "red": true,
            "fen1": "2bakab2/9/1c4n2/p1r1p1p1p/1C5r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/1c4n2/p1r1p1p1p/4C2r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "炮八平五",
            "score": -925,
            "scoreUp": 0
        },
        {
            "idx": 37,
            "x1": 4,
            "y1": 3,
            "x2": 4,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/9/1c4n2/p1r1p1p1p/4C2r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/1c4n2/p1r3p1p/4p2r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "卒５进１",
            "score": -887,
            "scoreUp": 0
        },
        {
            "idx": 38,
            "x1": 3,
            "y1": 5,
            "x2": 1,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/1c4n2/p1r3p1p/4p2r1/1n1R5/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/1c4n2/p1r3p1p/4p2r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车六平八",
            "score": -1020,
            "scoreUp": 0
        },
        {
            "idx": 39,
            "x1": 1,
            "y1": 2,
            "x2": 4,
            "y2": 2,
            "red": false,
            "fen1": "2bakab2/9/1c4n2/p1r3p1p/4p2r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c1n2/p1r3p1p/4p2r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "砲２平５",
            "score": -893,
            "scoreUp": 0
        },
        {
            "idx": 40,
            "x1": 1,
            "y1": 5,
            "x2": 5,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/4c1n2/p1r3p1p/4p2r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c1n2/p1r3p1p/4p2r1/5R3/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车八平四",
            "score": -964,
            "scoreUp": 0
        },
        {
            "idx": 41,
            "x1": 4,
            "y1": 4,
            "x2": 4,
            "y2": 5,
            "red": false,
            "fen1": "2bakab2/9/4c1n2/p1r3p1p/4p2r1/5R3/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c1n2/p1r3p1p/7r1/4pR3/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "卒５进１",
            "score": -891,
            "scoreUp": 0
        },
        {
            "idx": 42,
            "x1": 5,
            "y1": 5,
            "x2": 4,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/4c1n2/p1r3p1p/7r1/4pR3/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c1n2/p1r3p1p/7r1/4R4/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车四平五",
            "score": -929,
            "scoreUp": 0
        },
        {
            "idx": 43,
            "x1": 6,
            "y1": 2,
            "x2": 4,
            "y2": 3,
            "red": false,
            "fen1": "2bakab2/9/4c1n2/p1r3p1p/7r1/4R4/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/7r1/4R4/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "马７进５",
            "score": -806,
            "scoreUp": 0
        },
        {
            "idx": 44,
            "x1": 4,
            "y1": 5,
            "x2": 1,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/7r1/4R4/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/7r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车五平八",
            "score": -975,
            "scoreUp": 0
        },
        {
            "idx": 45,
            "x1": 7,
            "y1": 4,
            "x2": 3,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/7r1/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/3r5/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "name": "车８平４",
            "score": -791,
            "scoreUp": 0
        },
        {
            "idx": 46,
            "x1": 0,
            "y1": 7,
            "x2": 1,
            "y2": 9,
            "red": true,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/3r5/1R7/P3P1P1P/N3BA3/5N2R/2BAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/3r5/1R7/P3P1P1P/4BA3/5N2R/1NBAK4",
            "name": "马九退八",
            "score": -1233,
            "scoreUp": 0
        },
        {
            "idx": 47,
            "x1": 3,
            "y1": 4,
            "x2": 3,
            "y2": 8,
            "red": false,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/3r5/1R7/P3P1P1P/4BA3/5N2R/1NBAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/4BA3/3r1N2R/1NBAK4",
            "name": "车４进４",
            "score": -1071,
            "scoreUp": 0
        },
        {
            "idx": 48,
            "x1": 2,
            "y1": 9,
            "x2": 0,
            "y2": 7,
            "red": true,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/4BA3/3r1N2R/1NBAK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3BA3/3r1N2R/1N1AK4",
            "name": "相七进九",
            "score": -1288,
            "scoreUp": 0
        },
        {
            "idx": 49,
            "x1": 3,
            "y1": 8,
            "x2": 0,
            "y2": 8,
            "red": false,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3BA3/3r1N2R/1N1AK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3BA3/r4N2R/1N1AK4",
            "name": "车４平１",
            "score": -1001,
            "scoreUp": 0
        },
        {
            "idx": 50,
            "x1": 5,
            "y1": 7,
            "x2": 4,
            "y2": 8,
            "red": true,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3BA3/r4N2R/1N1AK4",
            "fen2": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3B4/r3AN2R/1N1AK4",
            "name": "仕四退五",
            "score": -1163,
            "scoreUp": 0
        },
        {
            "idx": 51,
            "x1": 2,
            "y1": 3,
            "x2": 2,
            "y2": 8,
            "red": false,
            "fen1": "2bakab2/9/4c4/p1r1n1p1p/9/1R7/P3P1P1P/B3B4/r3AN2R/1N1AK4",
            "fen2": "2bakab2/9/4c4/p3n1p1p/9/1R7/P3P1P1P/B3B4/r1r1AN2R/1N1AK4",
            "name": "车３进５",
            "score": -1377,
            "scoreUp": 0
        },
        {
            "idx": 52,
            "x1": 8,
            "y1": 8,
            "x2": 7,
            "y2": 8,
            "red": true,
            "fen1": "2bakab2/9/4c4/p3n1p1p/9/1R7/P3P1P1P/B3B4/r1r1AN2R/1N1AK4",
            "fen2": "2bakab2/9/4c4/p3n1p1p/9/1R7/P3P1P1P/B3B4/r1r1AN1R1/1N1AK4",
            "name": "车一平二",
            "score": -913,
            "scoreUp": 0
        },
        {
            "idx": 53,
            "x1": 4,
            "y1": 3,
            "x2": 2,
            "y2": 4,
            "red": false,
            "fen1": "2bakab2/9/4c4/p3n1p1p/9/1R7/P3P1P1P/B3B4/r1r1AN1R1/1N1AK4",
            "fen2": "2bakab2/9/4c4/p5p1p/2n6/1R7/P3P1P1P/B3B4/r1r1AN1R1/1N1AK4",
            "name": "马５进３",
            "score": -816,
            "scoreUp": 0
        },
        {
            "idx": 54,
            "x1": 7,
            "y1": 8,
            "x2": 7,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/4c4/p5p1p/2n6/1R7/P3P1P1P/B3B4/r1r1AN1R1/1N1AK4",
            "fen2": "2bakab2/9/4c4/p5p1p/2n6/1R5R1/P3P1P1P/B3B4/r1r1AN3/1N1AK4",
            "name": "车二进三",
            "score": -1585,
            "scoreUp": 0
        },
        {
            "idx": 55,
            "x1": 2,
            "y1": 4,
            "x2": 3,
            "y2": 6,
            "red": false,
            "fen1": "2bakab2/9/4c4/p5p1p/2n6/1R5R1/P3P1P1P/B3B4/r1r1AN3/1N1AK4",
            "fen2": "2bakab2/9/4c4/p5p1p/9/1R5R1/P2nP1P1P/B3B4/r1r1AN3/1N1AK4",
            "name": "马３进４",
            "score": -822,
            "scoreUp": 0
        },
        {
            "idx": 56,
            "x1": 1,
            "y1": 5,
            "x2": 3,
            "y2": 5,
            "red": true,
            "fen1": "2bakab2/9/4c4/p5p1p/9/1R5R1/P2nP1P1P/B3B4/r1r1AN3/1N1AK4",
            "fen2": "2bakab2/9/4c4/p5p1p/9/3R3R1/P2nP1P1P/B3B4/r1r1AN3/1N1AK4",
            "name": "车八平六",
            "score": -825,
            "scoreUp": 0
        },
        {
            "idx": 57,
            "x1": 2,
            "y1": 8,
            "x2": 2,
            "y2": 6,
            "red": false,
            "fen1": "2bakab2/9/4c4/p5p1p/9/3R3R1/P2nP1P1P/B3B4/r1r1AN3/1N1AK4",
            "fen2": "2bakab2/9/4c4/p5p1p/9/3R3R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "name": "车３退２",
            "score": -1253,
            "scoreUp": 0
        },
        {
            "idx": 58,
            "x1": 3,
            "y1": 5,
            "x2": 3,
            "y2": 3,
            "red": true,
            "fen1": "2bakab2/9/4c4/p5p1p/9/3R3R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "fen2": "2bakab2/9/4c4/p2R2p1p/9/7R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "name": "车六进二",
            "score": -1317,
            "scoreUp": 0
        },
        {
            "idx": 59,
            "x1": 5,
            "y1": 0,
            "x2": 4,
            "y2": 1,
            "red": false,
            "fen1": "2bakab2/9/4c4/p2R2p1p/9/7R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/7R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "name": "士６进５",
            "score": -682,
            "scoreUp": 0
        },
        {
            "idx": 60,
            "x1": 7,
            "y1": 5,
            "x2": 2,
            "y2": 5,
            "red": true,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/7R1/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "name": "车二平七",
            "score": -1160,
            "scoreUp": 0
        },
        {
            "idx": 61,
            "x1": 2,
            "y1": 6,
            "x2": 1,
            "y2": 6,
            "red": false,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/P1rnP1P1P/B3B4/r3AN3/1N1AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/B3B4/r3AN3/1N1AK4",
            "name": "车３平２",
            "score": -960,
            "scoreUp": 0
        },
        {
            "idx": 62,
            "x1": 1,
            "y1": 9,
            "x2": 2,
            "y2": 7,
            "red": true,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/B3B4/r3AN3/1N1AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/B1N1B4/r3AN3/3AK4",
            "name": "马八进七",
            "score": -1247,
            "scoreUp": 0
        },
        {
            "idx": 63,
            "x1": 0,
            "y1": 8,
            "x2": 0,
            "y2": 7,
            "red": false,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/B1N1B4/r3AN3/3AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/r1N1B4/4AN3/3AK4",
            "name": "车１退１",
            "score": -285,
            "scoreUp": 0
        },
        {
            "idx": 64,
            "x1": 4,
            "y1": 8,
            "x2": 3,
            "y2": 7,
            "red": true,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/r1N1B4/4AN3/3AK4",
            "fen2": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/r1NAB4/5N3/3AK4",
            "name": "仕五进六",
            "score": -898,
            "scoreUp": 0
        },
        {
            "idx": 65,
            "x1": 4,
            "y1": 2,
            "x2": 4,
            "y2": 7,
            "red": false,
            "fen1": "2bak1b2/4a4/4c4/p2R2p1p/9/2R6/Pr1nP1P1P/r1NAB4/5N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p2R2p1p/9/2R6/Pr1nP1P1P/r1NAc4/5N3/3AK4",
            "name": "砲５进５",
            "score": -595,
            "scoreUp": 0
        },
        {
            "idx": 66,
            "x1": 2,
            "y1": 7,
            "x2": 3,
            "y2": 5,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p2R2p1p/9/2R6/Pr1nP1P1P/r1NAc4/5N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p2R2p1p/9/2RN5/Pr1nP1P1P/r2Ac4/5N3/3AK4",
            "name": "马七进六",
            "score": -871,
            "scoreUp": 0
        },
        {
            "idx": 67,
            "x1": 1,
            "y1": 6,
            "x2": 1,
            "y2": 8,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p2R2p1p/9/2RN5/Pr1nP1P1P/r2Ac4/5N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p2R2p1p/9/2RN5/P2nP1P1P/r2Ac4/1r3N3/3AK4",
            "name": "车２进２",
            "score": -603,
            "scoreUp": 0
        },
        {
            "idx": 68,
            "x1": 3,
            "y1": 3,
            "x2": 5,
            "y2": 3,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p2R2p1p/9/2RN5/P2nP1P1P/r2Ac4/1r3N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/r2Ac4/1r3N3/3AK4",
            "name": "车六平四",
            "score": -871,
            "scoreUp": 0
        },
        {
            "idx": 69,
            "x1": 0,
            "y1": 7,
            "x2": 0,
            "y2": 8,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/r2Ac4/1r3N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/rr3N3/3AK4",
            "name": "车１进１",
            "score": -187,
            "scoreUp": 0
        },
        {
            "idx": 70,
            "x1": 4,
            "y1": 9,
            "x2": 5,
            "y2": 9,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/rr3N3/3AK4",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/rr3N3/3A1K3",
            "name": "帅五平四",
            "score": -383,
            "scoreUp": 0
        },
        {
            "idx": 71,
            "x1": 1,
            "y1": 8,
            "x2": 3,
            "y2": 8,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/rr3N3/3A1K3",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/r2r1N3/3A1K3",
            "name": "车２平４",
            "score": 210,
            "scoreUp": 0
        },
        {
            "idx": 72,
            "x1": 2,
            "y1": 5,
            "x2": 2,
            "y2": 6,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/2RN5/P2nP1P1P/3Ac4/r2r1N3/3A1K3",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/3N5/P1RnP1P1P/3Ac4/r2r1N3/3A1K3",
            "name": "车七退一",
            "score": -590,
            "scoreUp": 0
        },
        {
            "idx": 73,
            "x1": 0,
            "y1": 8,
            "x2": 0,
            "y2": 9,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/3N5/P1RnP1P1P/3Ac4/r2r1N3/3A1K3",
            "fen2": "2bak1b2/4a4/9/p4Rp1p/9/3N5/P1RnP1P1P/3Ac4/3r1N3/r2A1K3",
            "name": "车１进１",
            "score": -306,
            "scoreUp": 0
        },
        {
            "idx": 74,
            "x1": 5,
            "y1": 3,
            "x2": 2,
            "y2": 3,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p4Rp1p/9/3N5/P1RnP1P1P/3Ac4/3r1N3/r2A1K3",
            "fen2": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P1RnP1P1P/3Ac4/3r1N3/r2A1K3",
            "name": "车四平七",
            "score": -3076,
            "scoreUp": 0
        },
        {
            "idx": 75,
            "x1": 4,
            "y1": 7,
            "x2": 4,
            "y2": 8,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P1RnP1P1P/3Ac4/3r1N3/r2A1K3",
            "fen2": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P1RnP1P1P/3A5/3rcN3/r2A1K3",
            "name": "砲５进１",
            "score": 0,
            "scoreUp": 0,
            "mate": -8
        },
        {
            "idx": 76,
            "x1": 2,
            "y1": 6,
            "x2": 2,
            "y2": 9,
            "red": true,
            "fen1": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P1RnP1P1P/3A5/3rcN3/r2A1K3",
            "fen2": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P2nP1P1P/3A5/3rcN3/r1RA1K3",
            "name": "车七退三",
            "score": 0,
            "scoreUp": 0,
            "mate": 2
        },
        {
            "idx": 77,
            "x1": 3,
            "y1": 8,
            "x2": 3,
            "y2": 9,
            "red": false,
            "fen1": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P2nP1P1P/3A5/3rcN3/r1RA1K3",
            "fen2": "2bak1b2/4a4/9/p1R3p1p/9/3N5/P2nP1P1P/3A5/4cN3/r1Rr1K3",
            "name": "车４进１",
            "score": 0,
            "scoreUp": 0,
            "mate": -1
        }
    ];

    document.oncontextmenu = function () {
        return false;
    }

    let nameArr = [];
    let dataIndex = -1;

    let myChart = echarts.init(document.getElementById('main'), null,
        {
            renderer: 'svg',
            locale: 'ZH'
        });

    function getOption() {

        let data = {
            data1: [],
            data2: [],
            data3: [],
            data4: [],
        };

        for (let i = 0; i < myData.length; i++) {
            data.data1.push(i + 1);
            let li = myData[i];

            data.data2.push(li.score);
            data.data3.push(li.name);
            if (li.mate) {
                console.log('ok');
                data.data4.push({
                    xAxis: i
                });
            }
        }

        return {
            title: {
                text: data.title + ' ' + data.desc,
                show: false,
                textAlign: 'left',
                textStyle: {
                    color: '#fff',
                    fontSize: 14,
                    fontWeight: 'normal',
                },
                backgroundColor: '#99aacc'
            },
            grid: {
                top: '10%',
                left: '2%',
                bottom: '5%',
                right: '2%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                data: data.data1,
            },
            yAxis: {
                type: 'value',
                min: data.min,
                max: data.max,
            },
            series: [
                {
                    data: data.data2,
                    type: 'line',
                    symbol: 'none',// 不显示底部圆点
                    connectNulls: false,// 是否连接空数据
                    smooth: false,
                    markLine: {
                        symbol: 'none',
                        label: {
                            show: false
                        },
                        data: data.data4
                    },
                }

            ],
            visualMap: {
                show: false,
                pieces: [
                    {min: parseFloat(0), max: parseFloat(0), color: '#999'},
                    {min: parseFloat(1), max: parseFloat(10000), color: '#c00'},
                    {min: parseFloat(-10000), max: parseFloat(-1), color: '#333'}
                ],
            },
            tooltip: {
                trigger: 'axis',
                extraCssText: 'padding:3px 7px;background-color: #0BBF8Eff;border:none;border-radius:2px;',
                formatter: function (params) {

                    const idx = params[0].dataIndex;
                    let li = myData[idx];

                    let html = '';
                    html += "<div style='color: #fff;'>"

                    // 步数
                    html += (idx + 1) + '/' + myData.length + ' ';

                    // 着法
                    html += li.name + ' ';

                    // 分数
                    if (li.score >= 0) {
                        html += ' 红优<span style="">' + li.score + '</span>';
                    } else {
                        html += ' 黑优<span style="">' + (0 - li.score) + '</span>';
                    }

                    // 几步杀
                    if (li.mate) {
                        html += " " + (li.mate < 0 ? 0 - li.mate : li.mate) + '步杀';
                    }

                    html += "</div>"
                    return html;
                }
            },
        };
    }

    function showResult(s) {
        myChart.resize();
        myData = JSON.parse(s);
        myChart.setOption(getOption());
    }

    function setHighLight(idx) {
        console.log('高亮');
        myChart.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: idx
        });
    }

    myChart.setOption(getOption());

    myChart.getZr().on('click', function (params) {
        java.selectMatchTableView(dataIndex);
    });

    myChart.on('highlight', (params) => {
        dataIndex = params.batch[0].dataIndex;
    });
</script>
</body>
</html>